package com.gopay.common.domain.bank.boc.bcdl.batch.res;

import java.io.Serializable;
import java.util.List;

import com.gopay.common.domain.bank.boc.bcdl.BaseBody;
import com.gopay.common.domain.bank.boc.bcdl.ResResultStatus;
import com.gopay.common.domain.bank.boc.bcdl.TransResBaseBody;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("bocb2e")
public class TransResBatchBody extends TransResBaseBody {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7414160284103239659L;
	
	@XStreamAlias("trans")
	private List<Inner> trans;
	
	public List<Inner> getTrans() {
		return trans;
	}

	public void setTrans(List<Inner> trans) {
		this.trans = trans;
	}
	
	@Override
	public ResResultStatus getResResultStatus() {
		// TODO Auto-generated method stub
		return trans.get(0).getStatus();
	}
	
	@XStreamAlias("trn-b2e0078-rs")
	public static class Inner implements Serializable{
		/**
		 * 
		 */
		private static final long serialVersionUID = 239757725850424242L;
		@XStreamAlias("status")
		private ResResultStatus status;
		
		@XStreamImplicit(itemFieldName="b2e0078-rs")
		private List<TransResBatch> batchs;

		public ResResultStatus getStatus() {
			return status;
		}

		public void setStatus(ResResultStatus status) {
			this.status = status;
		}

		public List<TransResBatch> getBatchs() {
			return batchs;
		}

		public void setBatchs(List<TransResBatch> batchs) {
			this.batchs = batchs;
		}
		
	}
}
